package com.bwie.service.impl;

import cn.hutool.core.date.DateUtil;
import com.bwie.common.domain.SmsRecord;
import com.bwie.common.domain.User;
import com.bwie.mapper.SmsRecordMapper;
import com.bwie.service.SmsRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author <a href="mailto:3364114353@qq.com">liuwenliang</a>
 * @version 1.0
 * @description:
 * @date 2025/9/9 10:45
 */
@Service
public class SmsRecordServiceImpl implements SmsRecordService {

    @Autowired
    private SmsRecordMapper smsRecordMapper;

    @Override
    public void addSmsRecord(User user) {
        SmsRecord smsRecord = new SmsRecord();
        smsRecord.setUserId(user.getId());
        smsRecord.setStatus("1");
        smsRecord.setCreateTime(DateUtil.date());
        smsRecordMapper.add(smsRecord);
    }
}
